namespace CastleSample.UI.Core
{
    /// <summary>
    /// Abstract implementation of IModule interface, all modules should be inherit from it.
    /// </summary>
    public abstract class ModuleBase : IModule
    {
        private string m_Name;

        /// <summary>
        /// Unique name of the module.
        /// </summary>
        public string Name
        {
            get { return m_Name; }
            set { m_Name = value; }
        }

        /// <summary>
        /// Version of the module.
        /// Just for display.
        /// </summary>
        public abstract string Version { get; }

        /// <summary>
        /// Will been called by container when load the module.
        /// </summary>
        public abstract bool OnLoad();

        /// <summary>
        /// Will been called when container loaded all moudules.
        /// </summary>
        public abstract void OnStartup();

        /// <summary>
        /// Will been called by container when unload the module.
        /// </summary>
        public abstract void OnUnload();
    }
}